package com.example.myapplication.model;

public class Word {

    public int id = 0;
    public String en = "";
    public String vi = "";
    public String vt = "";
    public String n = "";
    public String adj = "";
    public String adv = "";
    public String conj = "";
    public String prep = "";
    public String pron = "";
    public String art = "";
    public String abbr = "";
    public String other = "";

    public String getTranslation() {
        String result = "";
        if(vi != null) {
            result += "vi." + vi + "\n";
        }
        if(vt != null) {
            result += "vt." + vt + "\n";
        }
        if(n != null) {
            result += "n." + n + "\n";
        }
        if(adj != null) {
            result += "adj." + adj + "\n";
        }
        if(adv != null) {
            result += "adv." + adv + "\n";
        }
        if(conj != null) {
            result += "conj." + conj + "\n";
        }
        if(prep != null) {
            result += "prep." + prep + "\n";
        }
        if(pron != null) {
            result += "pron." + pron + "\n";
        }
        if(art != null) {
            result += "art." + art + "\n";
        }
        if(abbr != null) {
            result += "abbr." + abbr + "\n";
        }
        if(other != null) {
            result += "other." + other + "\n";
        }
        return result;
    }
}
